package com.jie.component.exception.enums;

import lombok.Getter;

/**
 * @author jie
 * @version 1.0 2025-02-10
 */
@Getter
public enum BusinessError {
    SYSTEM_BUSY(500, "系统繁忙"),
    PHONE_REGISTER(500, "手机号已经注册"),
    CODE_HAS_BEEN_SENT(500, "已经发送验证码"),
    CODE_HAS_EXPIRE(500, "验证码已过期或未发送"),
    CODE_ERROR(500, "验证码错误"),
    PHONE_ERROR_TOO_MANY(500, "账号或密码错误次数过多，请稍后重试"),
    PHONE_NOT_REGISTER(500, "手机号未注册"),
    PASSWORD_ERROR(500, "账号密码错误"),
    ACCOUNT_DISABLED(500, "账号被禁用"),
    API_RULE_TRIGGER(500, "用户调用太过频繁，稍后再试");

    private final Integer code;

    private final String msg;

    BusinessError(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
